<template>
  <div id="hotelLayout">
    <div class="item-info clearfix">
      <div class="item-img fl">
        <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1504862056406&di=b94f105d49bd220ffe17dc6667947e76&imgtype=0&src=http%3A%2F%2Fimg00.hc360.com%2Fhotelsupplies%2F201508%2F201508121618565629.jpg" alt="Hotle">
      </div>
      <div class="item-txt fl">
        <div>
          <h3>{{hotel.ResName}}</h3>
          <a @click="markPosition">
          <h4><Icon type="location"></Icon>{{hotel.ProvinceName}}{{hotel.CityName}}</h4>
          </a>
        </div>
        <div>
          <span>94%的人喜欢, 1234人住过</span>
        </div>
      </div>
      <div class="plus fr">
        <Button type="success" size="small" >预定</Button>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'hotel-item',
    props: ['hotel'],
    methods: {
      markPosition () {
        this.$emit('refreshbizlines', 121.5273285 + (Math.random() - 0.5) * 0.02, 31.21515044 + (Math.random() - 0.5) * 0.02)
      }
    }
  }
</script>
<style>
  #hotelLayout .item-info {
    border-bottom: 1px solid #ccc;
    padding: 10px;
    background:#fff;
  }
  #hotelLayout .item-info img {
    width: 80px;
    height: 80px;
  }
  #hotelLayout .item-info .item-txt {
    padding-left: 10px
  }

  #hotelLayout .item-info .item-txt h3 {
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
    width: 150px;
  }

  #hotelLayout .item-info .item-txt h4 {
    color: #959595;
    font-size: 11px;
    line-height: 30px;
  }

  #hotelLayout .item-info .item-txt div:last-child {
    margin-top: 14px;
  }
  #hotelLayout .item-info .item-txt span {
    color: #959595;
    font-size:10px;
  }
  #hotelLayout .item-info .plus {
    padding: 15px;
    font-size: 34px;
    font-weight: 700;
  }
</style>
